package com.lwc.demos.web;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import java.lang.annotation.Documented;
import java.time.LocalDateTime;

@Builder
@NoArgsConstructor
@AllArgsConstructor
@Data
@Document(collection = "2000_person")
//如果你指定了collection ，那么在mongo中 集合的名称就是 你设置的名称   否则就是类名
public class Person {
     @Id
    Long id;

    String name;

    Integer age;

    String phone;

//@Indexed(expireAfterSeconds=30)
        //队列ttl   30秒过期
   // LocalDateTime localDateTime;
}
